Displays the new licence->name instead of license_account matching licence #7097
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #7096
The PR only changes dashboard view (Your licence) with a fallback:
user->licence->name
is if exists in the user endpointlicence_account
matching licence name ifuser->licence->name
is emptyThe user endpoint will soon include new values under
licence
, likename
,expiration
,type
,version
.Until this is the case, this code will just fallback to current way of displaying the license name in the dashboard.
After the new license data is available to the plugin (once service team deploys and repopulate Redis for users), the plugin will have
user->licence->name
set and then can display it directly.See the new user endpoint data JSON response format.
Back-compatibility: Users with previous plugin versions will not be able to see their accurate license name. A fallback was made on service side to display Infinite, for new licenses.
Type of change
Detailed scenario
A missing
licence->name
value should not trigger any error and fallback to legacy way to matching the licence name.See two types of user, one with new license data, one without.
Technical description
Documentation
The new user endpoint JSON format:
Risks
If the license->name is missing, the plugin will behave just as before.
Mandatory Checklist
Code validation
Code style
Additional Checks